Skip to content

[dev] [Marfuen] mariano/fix-vendor-patch-400#2375

Merged
Marfuen merged 3 commits intomainfrom
mariano/fix-vendor-patch-400
Mar 25, 2026
Merged

[dev] [Marfuen] mariano/fix-vendor-patch-400#2375
Marfuen merged 3 commits intomainfrom
mariano/fix-vendor-patch-400

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This is an automated pull request to merge mariano/fix-vendor-patch-400 into dev.
It was created by the [Auto Pull Request] action.

The form sends the existing assigneeId on every PATCH even when
the user only changed a different field (e.g. website). If the
vendor's current assignee is a platform admin, every update fails
with "Cannot assign a platform admin as assignee" — even though
no one is trying to change the assignee.

Only run validateAssigneeNotPlatformAdmin when assigneeId is
actually being changed to a different value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Mar 25, 2026 8:33pm
comp-framework-editor Ready Ready Preview, Comment Mar 25, 2026 8:33pm
portal Ready Ready Preview, Comment Mar 25, 2026 8:33pm

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 25, 2026

PR Summary

Medium Risk
Changes vendor assignment/validation logic in both the API update path and onboarding automation, which could affect who gets assigned and when updates are rejected, but scope is limited to assignee handling.

Overview
Prevents PATCH vendor updates from failing with an assignee validation error when assigneeId is unchanged by only re-validating when the assignee is actually being modified.

Updates the onboarding generate-vendor-mitigation task to not assign vendors to platform admins (sets assigneeId to null for admin authors) to avoid creating vendors that cannot be managed via the assignee UI.

Written by Cursor Bugbot for commit c03cc73. This will update automatically on new commits. Configure here.

… onboarding

The vendor mitigation task assigned vendors to whoever triggered
onboarding (authorId). When a platform admin onboards a customer,
all vendors get assigned to the admin. Since platform admins are
filtered from the UI assignee list, vendors appear "Unassigned"
but the backend still has the admin's member ID — which then
blocks all PATCH updates with "Cannot assign a platform admin".

Two fixes:
- Service: only validate assignee when it's actually changing
- Onboarding: skip assignee if author is a platform admin

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Marfuen Marfuen merged commit 9e508c2 into main Mar 25, 2026
8 of 10 checks passed
@Marfuen Marfuen deleted the mariano/fix-vendor-patch-400 branch March 25, 2026 20:32
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.11.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants